//
//  OrangeView.swift
//
//  Created by 周成龙
//

import UIKit

class OrangeView: UIView {

    @IBOutlet weak var btn: UIButton!
    
    override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
        
        let btnP = self.convert(point, to: btn)
        
        if btn.point(inside: btnP, with: event) {
            return btn
        }else {
            return super.hitTest(point, with: event)
        }
    }
    
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        print("OrangeView")
    }
    
}
